const Path = require('path');
const Fs = require('fs');
exports.template = Fs.readFileSync(Path.join(__dirname, 'panel.html'), 'utf-8');
exports.style = Fs.readFileSync(Path.join(__dirname, 'panel.css'), 'utf-8');

exports.$ = {
    btn: '#btn',
    input: '#input'
}

exports.ready = async function () {
    let name = await Editor.Message.request('hello-world', 'getData');
    this.$.input.value = name;

    this.$.btn.addEventListener('click', async () => {
        let name = this.$.input.value;
        Editor.Message.send('hello-world', 'saveData', name)
    });
}

